]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Return zero preferred size
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 11 Mar 2021 14:26:14 +0000 (15:26 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 13 Mar 2021 22:13:25 +0000 (22:13 +0000)
The OverviewControls actor gets allocated a fixed size by its parent,
the OverviewActor, anyway, so it's pretty useless to go through the size
request machinery and add up all the sizes of items in the iconGrid,
coming up with a preferred size that's wrong anyway.

Instead simply return a min and preferred size of 0 in
get_preferred_height/width of ControlsManagerLayout.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1755>

js/ui/overviewControls.js

index 2a0dd3c66d7bbb9a049bc160317fb1e3239fa727..b848811370b659e656436ba62934c2978a90aeff 100644 (file)
@@ -115,6 +115,16 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
         this.hookup_style(container);
     }
 
+    vfunc_get_preferred_width(_container, _forHeight) {
+        // The MonitorConstraint will allocate us a fixed size anyway
+        return [0, 0];
+    }
+
+    vfunc_get_preferred_height(_container, _forWidth) {
+        // The MonitorConstraint will allocate us a fixed size anyway
+        return [0, 0];
+    }
+
     vfunc_allocate(container, box) {
         const childBox = new Clutter.ActorBox();